package com.mxpio.erp.common.plan.entity;

import com.mxpio.erp.common.inventory.entity.Warehouse;
import com.mxpio.erp.common.jpa.model.NoticeLine;
import com.mxpioframework.security.annotation.Dict;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.math.BigDecimal;

/**
 * @Author : 吴盼盼
 * @Datetime : 2022/11/14 11:32
 * @Desc :
 * @Modor :  Modifytime:
 * @modDesc :
 */
@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_PLAN_OD_DEFECT_NOTICE_LINE")
@Schema(description="组织需求不良品退料处理通知单行")
public class ODDefectiveRejNoticeLine extends NoticeLine {

    @Column(name = "BOM_WH_CODE_")
    @Schema(description = "订单Bom对应仓库")
    @Dict(dicCode = "whCode", dicEntity = Warehouse.class, dicText = "whName")
    private String bomWhCode;

	private static final long serialVersionUID = 1L;

	@Column(name = "REPORTER_")
    @Schema(description = "发现人")
    private String reporter;

    @Column(name = "REPORT_PROC_")
    @Schema(description = "发现工序")
    private String reportProc;

    @Column(name = "EXCEPTION_TYPE_")
    @Schema(description = "异常分类")
    private String exceptionType;

    @Column(name = "DEFECTIVE_REASON_")
    @Schema(description = "不良原因")
    private String defectiveReason;

    @Column(name = "DEFECTIVE_DESC_")
    @Schema(description = "原因描述")
    private String defectiveDesc;

    @Column(name = "RESPONSE_UNIT_")
    @Schema(description = "责任单位")
    private String responseUnit;

    @Column(name = "SUPPLEMENT_FLAG_")
    @Schema(description = "是否补料")
    private String supplementFlag;


    //通知单打印 需要展示的字段
    @Transient
    @Schema(description = "材料牌号")
    private String materialBrand;


    @Transient
    @Schema(description = "材料类型")
    @Dict(dicCode = "ERP_TECH_MATERIAL_TYPE")
    private String materialType;

    @Transient
    @Schema(description = "下料长度")
    private BigDecimal makeLength;


    @Transient
    @Schema(description = "下料面积")
    private BigDecimal makeArea;

    @Transient
    @Schema(description = "可制数量")
    private BigDecimal makeNum;

    @Transient
    @Schema(description = "密度（g/cm3）")
    private BigDecimal materialDensity;
    @Transient
    @Schema(description = "直径（mm）")
    private BigDecimal materialDiameter;
    @Transient
    @Schema(description = "壁厚（mm）")
    private BigDecimal materialThickness;


}
